package com.yiji.fintech.musfinance.common.eventbus;

import com.google.common.eventbus.AsyncEventBus;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.Executors;

/**
 * Created by ouwen@yiji.com} on 2017/9/14.
 */
@Configuration
@ComponentScan(basePackages = {"com.yiji.fintech.musfinance"})
public class AsyncEventBusConfig {
    @Bean
    public AsyncEventBus eventBus() {
        return new AsyncEventBus( Executors.newFixedThreadPool(5));
    }
}
